package com.hp.define
/**
 * Created by hp4664 on 2018/1/26.
 */
public  class ActionMap {

    public static  Map<String, Integer> mapping
    // 获取配置请求
    public static final Integer CONFIG = 0
    public static final Integer UPLOAD_IMAGE = 1
    public static final Integer UPLOAD_SCRAWL = 2
    public static final Integer UPLOAD_VIDEO = 3
    public static final Integer UPLOAD_FILE = 4
    public static final Integer CATCH_IMAGE = 5
    public static final Integer LIST_FILE = 6
    public static final Integer LIST_IMAGE = 7

    static {
        mapping = new HashMap<String, Integer>(){{
            put( "config", ActionMap.CONFIG )
            put( "uploadimage", ActionMap.UPLOAD_IMAGE )
            put( "uploadscrawl", ActionMap.UPLOAD_SCRAWL )
            put( "uploadvideo", ActionMap.UPLOAD_VIDEO )
            put( "uploadfile", ActionMap.UPLOAD_FILE )
            put( "catchimage", ActionMap.CATCH_IMAGE )
            put( "listfile", ActionMap.LIST_FILE )
            put( "listimage", ActionMap.LIST_IMAGE )
        }}
    }

    public static int getType ( String key ) {
        return ActionMap.mapping.get( key )
    }

}